package com.dayu.behavior.chain;

public class FirstApprover extends Approver{

    public FirstApprover(String name) {
        super(name);
    }

    @Override
    public void processRequest(PurchaseRequest purchaseRequest) {
        if(purchaseRequest.getPrice() < 5000 ){
            System.out.println("金额："+purchaseRequest.getPrice()+",被"+this.name+"处理");
        }else {
            approver.processRequest(purchaseRequest);
        }

    }

}
